<include file="Public:headersmall"/>
<style>
.center{width:1000px;margin:0 auto;margin-top:10px}
.left{width:160px;border:1px solid #dddddd;float:left;}
.main{width:830px;float:right;}
.title2{display:block;background:#317ee7;color:#fff;text-align:left;font-size:16px;height:25px;line-height:25px}
.left dl{display:block;background:#fff;font-size:13px;height:25px;line-height:25px}
.help{margin-top:5px}
input{padding:5px}
tr{ height:40px}
</style>
<div class="center">您的位置：<a href="__APP__">首页</a>-><a href="__GROUP__/Member"><font color="#317ee7">会员中心</font></a></div>
<div class="center">
   <div class="left">
    <include file="left"/>
   </div>

   <div class="main">
		   <table border="0" width="100%" id="table1">
			<tr>
				<td align="right">E_mail:</td>
				<td><input type="text" name="email" size="20" value="{$member.email}"></td>
			</tr>
			<tr>
				<td align="right">姓名：</td>
				<td><input type="text" name="mname" size="20" value="{$member.name}"></td>
			</tr>
			<tr>
				<td align="right">性别：</td>
				<td>
<if condition="$member.sex eq 'w'">
				<input type="radio" value="m" name="sex">男<input type="radio" value="w" checked name="sex">女</td>
<else/>
				<input type="radio" value="m" checked name="sex">男<input type="radio" value="w" name="sex">女</td>
</if>
			</tr>
			<tr>
				<td align="right">地址：</td>
				<td><input type="text" name="area" size="20" value="{$member.area}"></td>
			</tr>
			<tr>
				<td align="right">固定电话：</td>
				<td><input type="text" name="tel" size="20" value="{$member.tel}"></td>
			</tr>
			<tr>
				<td align="right">手机：</td>
				<td><input type="text" name="mobile" size="20" value="{$member.mobile}"></td>
			</tr>
			<tr>
				<td align="right">注册时间：</td>
				<td>{$member.regtime|date="Y-m-d H:i",###}</td>
			</tr>
			<tr>
				<td align="right">上次登录：</td>
				<td>{$member.last_login|date="Y-m-d H:i",###}</td>
			</tr>
			<tr>
				<td align="right">　</td>
				<td><input type="text" name="member_id" value="{$member.member_id}" style="display:none"></td>
			</tr>
			<tr>
				<td align="right" colspan="2">
				<p align="center"><input type="button" id="save" value="保存修改" name="B1"></td>
			</tr>
		</table>
   </div>
</div>

<script>
$("#save").click(function(){
    var member_id=$("[name=member_id]").val();
	var name=$("[name=mname]").val();
	var email=$("[name=email]").val();
	var sex=$("[name=sex]").val();
	var area=$("[name=area]").val();
	var tel=$("[name=tel]").val();
	var mobile=$("[name=mobile]").val();

	$.ajax({
	    type:"POST",
		url:"__URL__/member_info/?action=save",
		dataType:"json",
		data:{'member_id':member_id,'name':name,'email':email,'sex':sex,'area':area,'tel':tel,'mobile':mobile},
		success:function(data){
		     if(data==1){
			     jError("<strong>此邮箱已被注册！</strong>",{TimeShown : 500,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){location.reload();}})
			}else if(data==2){
			     jSuccess("<strong>修改成功！</strong>",{TimeShown : 500,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){window.parent.location.reload();}})
			}
		}
	})
})
</script>

<link rel="stylesheet" type="text/css" href="__APP__/statics/css/jNotify.jquery.css" />
<script type="text/javascript" src="__APP__/statics/jNotify.jquery.js"></script>
<div style="clear:both"></div>
<br>
<include file="Public:footersmall"/>